﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes.mssql;
using SharpSqlAnalyzer.nodes.oracle;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002A2 RID: 674
	public class TCreateFunctionSqlNode : TParseTreeNode
	{
		// Token: 0x1700043A RID: 1082
		// (set) Token: 0x0600160F RID: 5647 RVA: 0x00326BFC File Offset: 0x00324DFC
		public List<TCreateFunctionOption> FunctionOptions
		{
			set
			{
				if (value == null)
				{
					return;
				}
				for (int i = 0; i < value.Count; i++)
				{
					this.FunctionOptoin = value[i];
				}
			}
		}

		// Token: 0x1700043B RID: 1083
		// (set) Token: 0x06001610 RID: 5648 RVA: 0x00326C2C File Offset: 0x00324E2C
		public TCreateFunctionOption FunctionOptoin
		{
			set
			{
				this._functionOption = value;
				switch (this._functionOption.OptionType)
				{
				case ECreateFunctionOptionType.stmts:
					this._functionBody = this._functionOption.FunctionBody;
					return;
				case ECreateFunctionOptionType.block:
					this._functionBody = this._functionOption.FunctionBody;
					return;
				case ECreateFunctionOptionType.language:
					this._procedureLanguage = this._functionOption.Language;
					return;
				case ECreateFunctionOptionType.window:
				case ECreateFunctionOptionType.common:
					break;
				case ECreateFunctionOptionType.objfile:
					this._objfile = this._functionOption.Objfile;
					this._linkSymbol = this._functionOption.LinkSymbol;
					break;
				default:
					return;
				}
			}
		}

		// Token: 0x1700043C RID: 1084
		// (get) Token: 0x06001611 RID: 5649 RVA: 0x00326CC3 File Offset: 0x00324EC3
		// (set) Token: 0x06001612 RID: 5650 RVA: 0x00326CCB File Offset: 0x00324ECB
		public TConstant SharedLibraryName
		{
			get
			{
				return this._sharedLibraryName;
			}
			set
			{
				this._sharedLibraryName = value;
			}
		}

		// Token: 0x1700043D RID: 1085
		// (get) Token: 0x06001613 RID: 5651 RVA: 0x00326CD4 File Offset: 0x00324ED4
		// (set) Token: 0x06001614 RID: 5652 RVA: 0x00326CDC File Offset: 0x00324EDC
		public TConstant FunctionDefinition
		{
			get
			{
				return this._functionDefinition;
			}
			set
			{
				this._functionDefinition = value;
			}
		}

		// Token: 0x1700043E RID: 1086
		// (get) Token: 0x06001615 RID: 5653 RVA: 0x00326CE5 File Offset: 0x00324EE5
		// (set) Token: 0x06001616 RID: 5654 RVA: 0x00326CED File Offset: 0x00324EED
		public TConstant FunctionBody
		{
			get
			{
				return this._functionBody;
			}
			set
			{
				this._functionBody = value;
			}
		}

		// Token: 0x06001617 RID: 5655 RVA: 0x00326CF6 File Offset: 0x00324EF6
		public void setReturnTable(TDummy d)
		{
			this._returnTable = d;
		}

		// Token: 0x06001618 RID: 5656 RVA: 0x00326CFF File Offset: 0x00324EFF
		public void setPostgreSQLOptions(List<TCreateFunctionOption> cfo)
		{
			this.PostgreSQLOptions = cfo;
		}

		// Token: 0x06001619 RID: 5657 RVA: 0x00326D08 File Offset: 0x00324F08
		public void setReturnDataType(TTypeName tn)
		{
			this._returnDataType = tn;
		}

		// Token: 0x0600161A RID: 5658 RVA: 0x00326D11 File Offset: 0x00324F11
		public void setBody(TParseTreeNode n)
		{
			this.Body = n;
		}

		// Token: 0x0600161B RID: 5659 RVA: 0x00326D1A File Offset: 0x00324F1A
		public void setParameters(TParameterDeclarationList pd)
		{
			this._parameters = pd;
		}

		// Token: 0x1700043F RID: 1087
		// (get) Token: 0x0600161D RID: 5661 RVA: 0x00326D2C File Offset: 0x00324F2C
		// (set) Token: 0x0600161C RID: 5660 RVA: 0x00326D23 File Offset: 0x00324F23
		public virtual List<TProcedureOption> ProcedureOptions
		{
			get
			{
				return this._procedureOptions;
			}
			set
			{
				this._procedureOptions = value;
			}
		}

		// Token: 0x17000440 RID: 1088
		// (get) Token: 0x0600161F RID: 5663 RVA: 0x00326D3D File Offset: 0x00324F3D
		// (set) Token: 0x0600161E RID: 5662 RVA: 0x00326D34 File Offset: 0x00324F34
		public virtual TObjectName ImplementionType
		{
			get
			{
				return this._implementionType;
			}
			set
			{
				this._implementionType = value;
			}
		}

		// Token: 0x17000441 RID: 1089
		// (set) Token: 0x06001620 RID: 5664 RVA: 0x00326D45 File Offset: 0x00324F45
		public TDummy FunctionCharacter
		{
			set
			{
				if (value == null)
				{
					return;
				}
				this.FuncHintList = (TDummyList)value.list1;
			}
		}

		// Token: 0x17000442 RID: 1090
		// (set) Token: 0x06001621 RID: 5665 RVA: 0x00326D5C File Offset: 0x00324F5C
		public virtual TDummyList FuncHintList
		{
			set
			{
				if (value == null)
				{
					return;
				}
				for (int i = 0; i < value.size(); i++)
				{
					TDummy dummyItem = value.getDummyItem(i);
					if (dummyItem.st1 != null)
					{
						this._isDeterministic = true;
					}
					else if (dummyItem.node1 is TInvokerRightsClause)
					{
						this._invokerRightsClause = (TInvokerRightsClause)dummyItem.node1;
					}
					else if (dummyItem.node1 is TParallelEnableClause)
					{
						this._parallelEnableClause = (TParallelEnableClause)dummyItem.node1;
					}
					else if (dummyItem.node1 is TResultCacheClause)
					{
						this._resultCacheClause = (TResultCacheClause)dummyItem.node1;
					}
				}
			}
		}

		// Token: 0x17000443 RID: 1091
		// (get) Token: 0x06001622 RID: 5666 RVA: 0x00326DF8 File Offset: 0x00324FF8
		public virtual bool Deterministic
		{
			get
			{
				return this._isDeterministic;
			}
		}

		// Token: 0x17000444 RID: 1092
		// (get) Token: 0x06001623 RID: 5667 RVA: 0x00326E00 File Offset: 0x00325000
		public virtual TParallelEnableClause ParallelEnableClause
		{
			get
			{
				return this._parallelEnableClause;
			}
		}

		// Token: 0x17000445 RID: 1093
		// (get) Token: 0x06001624 RID: 5668 RVA: 0x00326E08 File Offset: 0x00325008
		public virtual TResultCacheClause ResultCacheClause
		{
			get
			{
				return this._resultCacheClause;
			}
		}

		// Token: 0x17000446 RID: 1094
		// (get) Token: 0x06001625 RID: 5669 RVA: 0x00326E10 File Offset: 0x00325010
		public virtual TInvokerRightsClause InvokerRightsClause
		{
			get
			{
				return this._invokerRightsClause;
			}
		}

		// Token: 0x17000447 RID: 1095
		// (get) Token: 0x06001626 RID: 5670 RVA: 0x00326E18 File Offset: 0x00325018
		public virtual TObjectName AsName
		{
			get
			{
				return this._asName;
			}
		}

		// Token: 0x17000448 RID: 1096
		// (get) Token: 0x06001627 RID: 5671 RVA: 0x00326E20 File Offset: 0x00325020
		public virtual TObjectName FunctionName
		{
			get
			{
				return this._functionName;
			}
		}

		// Token: 0x17000449 RID: 1097
		// (get) Token: 0x06001629 RID: 5673 RVA: 0x00326E31 File Offset: 0x00325031
		// (set) Token: 0x06001628 RID: 5672 RVA: 0x00326E28 File Offset: 0x00325028
		public virtual TParameterDeclarationList Parameters
		{
			get
			{
				return this._parameters;
			}
			set
			{
				this._parameters = value;
			}
		}

		// Token: 0x0600162A RID: 5674 RVA: 0x00326E39 File Offset: 0x00325039
		public override void init(object arg1)
		{
			this._functionName = (TObjectName)arg1;
			this._functionName.DbObjectType = EDbObjectType.function;
		}

		// Token: 0x0600162B RID: 5675 RVA: 0x00326E54 File Offset: 0x00325054
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			this._asName = (TObjectName)arg2;
		}

		// Token: 0x1700044A RID: 1098
		// (get) Token: 0x0600162D RID: 5677 RVA: 0x00326E72 File Offset: 0x00325072
		// (set) Token: 0x0600162C RID: 5676 RVA: 0x00326E69 File Offset: 0x00325069
		public virtual int Kind
		{
			get
			{
				return this._kind;
			}
			set
			{
				this._kind = value;
			}
		}

		// Token: 0x1700044B RID: 1099
		// (get) Token: 0x0600162E RID: 5678 RVA: 0x00326E7A File Offset: 0x0032507A
		// (set) Token: 0x0600162F RID: 5679 RVA: 0x00326E82 File Offset: 0x00325082
		public virtual TCallSpec CallSpec
		{
			get
			{
				return this._callSpec;
			}
			set
			{
				this._callSpec = value;
			}
		}

		// Token: 0x1700044C RID: 1100
		// (get) Token: 0x06001631 RID: 5681 RVA: 0x00326E94 File Offset: 0x00325094
		// (set) Token: 0x06001630 RID: 5680 RVA: 0x00326E8B File Offset: 0x0032508B
		public virtual TStatementSqlNode Stmt
		{
			get
			{
				return this._stmt;
			}
			set
			{
				this._stmt = value;
			}
		}

		// Token: 0x1700044D RID: 1101
		// (get) Token: 0x06001632 RID: 5682 RVA: 0x00326E9C File Offset: 0x0032509C
		// (set) Token: 0x06001633 RID: 5683 RVA: 0x00326EA4 File Offset: 0x003250A4
		public virtual TExceptionClause ExceptionClause
		{
			get
			{
				return this._exceptionClause;
			}
			set
			{
				this._exceptionClause = value;
			}
		}

		// Token: 0x1700044E RID: 1102
		// (get) Token: 0x06001634 RID: 5684 RVA: 0x00326EAD File Offset: 0x003250AD
		// (set) Token: 0x06001635 RID: 5685 RVA: 0x00326EB5 File Offset: 0x003250B5
		public virtual TStatementListSqlNode DeclareStmts
		{
			get
			{
				return this._declareStmts;
			}
			set
			{
				this._declareStmts = value;
			}
		}

		// Token: 0x1700044F RID: 1103
		// (get) Token: 0x06001636 RID: 5686 RVA: 0x00326EBE File Offset: 0x003250BE
		// (set) Token: 0x06001637 RID: 5687 RVA: 0x00326EC6 File Offset: 0x003250C6
		public virtual TStatementListSqlNode Stmts
		{
			get
			{
				return this._stmts;
			}
			set
			{
				this._stmts = value;
			}
		}

		// Token: 0x17000450 RID: 1104
		// (get) Token: 0x06001638 RID: 5688 RVA: 0x00326ECF File Offset: 0x003250CF
		// (set) Token: 0x06001639 RID: 5689 RVA: 0x00326ED7 File Offset: 0x003250D7
		public virtual TBlockSqlNode Blcok
		{
			get
			{
				return this._blcok;
			}
			set
			{
				this._blcok = value;
			}
		}

		// Token: 0x17000451 RID: 1105
		// (get) Token: 0x0600163A RID: 5690 RVA: 0x00326EE0 File Offset: 0x003250E0
		// (set) Token: 0x0600163B RID: 5691 RVA: 0x00326EE8 File Offset: 0x003250E8
		public virtual TReturnSqlNode ReturnSqlNode
		{
			get
			{
				return this._returnSqlNode;
			}
			set
			{
				this._returnSqlNode = value;
			}
		}

		// Token: 0x17000452 RID: 1106
		// (get) Token: 0x0600163D RID: 5693 RVA: 0x00326EFA File Offset: 0x003250FA
		// (set) Token: 0x0600163C RID: 5692 RVA: 0x00326EF1 File Offset: 0x003250F1
		public virtual TTypeName ReturnDataType
		{
			get
			{
				return this._returnDataType;
			}
			set
			{
				this._returnDataType = value;
			}
		}

		// Token: 0x17000453 RID: 1107
		// (get) Token: 0x0600163F RID: 5695 RVA: 0x00326F0B File Offset: 0x0032510B
		// (set) Token: 0x0600163E RID: 5694 RVA: 0x00326F02 File Offset: 0x00325102
		public virtual TDummy ReturnTable
		{
			get
			{
				return this._returnTable;
			}
			set
			{
				this._returnTable = value;
			}
		}

		// Token: 0x17000454 RID: 1108
		// (get) Token: 0x06001640 RID: 5696 RVA: 0x00326F13 File Offset: 0x00325113
		public virtual TCompoundSqlNode CompoundSql
		{
			get
			{
				return this._compoundSql;
			}
		}

		// Token: 0x17000455 RID: 1109
		// (get) Token: 0x06001641 RID: 5697 RVA: 0x00326F1B File Offset: 0x0032511B
		public virtual TReturnSqlNode ReturnSql
		{
			get
			{
				return this._returnSql;
			}
		}

		// Token: 0x17000456 RID: 1110
		// (set) Token: 0x06001642 RID: 5698 RVA: 0x00326F23 File Offset: 0x00325123
		public virtual object Body
		{
			set
			{
				if (value is TReturnSqlNode)
				{
					this._returnSql = (TReturnSqlNode)value;
					return;
				}
				if (value is TCompoundSqlNode)
				{
					this._compoundSql = (TCompoundSqlNode)value;
				}
			}
		}

		// Token: 0x17000457 RID: 1111
		// (set) Token: 0x06001643 RID: 5699 RVA: 0x00326F50 File Offset: 0x00325150
		public virtual List<TCreateFunctionOption> PostgreSQLOptions
		{
			set
			{
				for (int i = 0; i < value.Count; i++)
				{
					this.PostgreSQLOption = value[i];
				}
			}
		}

		// Token: 0x17000458 RID: 1112
		// (get) Token: 0x06001644 RID: 5700 RVA: 0x00326F7B File Offset: 0x0032517B
		public virtual TConstant LinkSymbol
		{
			get
			{
				return this._linkSymbol;
			}
		}

		// Token: 0x17000459 RID: 1113
		// (get) Token: 0x06001645 RID: 5701 RVA: 0x00326F83 File Offset: 0x00325183
		public virtual TConstant Objfile
		{
			get
			{
				return this._objfile;
			}
		}

		// Token: 0x1700045A RID: 1114
		// (get) Token: 0x06001646 RID: 5702 RVA: 0x00326F8B File Offset: 0x0032518B
		public virtual TConstant ProcedureLanguage
		{
			get
			{
				return this._procedureLanguage;
			}
		}

		// Token: 0x1700045B RID: 1115
		// (get) Token: 0x06001648 RID: 5704 RVA: 0x00326F9C File Offset: 0x0032519C
		// (set) Token: 0x06001647 RID: 5703 RVA: 0x00326F93 File Offset: 0x00325193
		public virtual TObjectName LabelName
		{
			get
			{
				return this._labelName;
			}
			set
			{
				this._labelName = value;
			}
		}

		// Token: 0x1700045C RID: 1116
		// (get) Token: 0x0600164A RID: 5706 RVA: 0x00326FAD File Offset: 0x003251AD
		// (set) Token: 0x06001649 RID: 5705 RVA: 0x00326FA4 File Offset: 0x003251A4
		public virtual TObjectName EndLabelName
		{
			get
			{
				return this._endLabelName;
			}
			set
			{
				this._endLabelName = value;
			}
		}

		// Token: 0x1700045D RID: 1117
		// (set) Token: 0x0600164B RID: 5707 RVA: 0x00326FB8 File Offset: 0x003251B8
		private TCreateFunctionOption PostgreSQLOption
		{
			set
			{
				switch (value.OptionType)
				{
				case ECreateFunctionOptionType.stmts:
					this.Stmts = value.SqlNodes;
					return;
				case ECreateFunctionOptionType.block:
				{
					TBlockSqlNode blockSqlNode = value.BlockSqlNode;
					this._labelName = blockSqlNode.LabelName;
					this.DeclareStmts = blockSqlNode.DeclareStmts;
					this.Stmts = blockSqlNode.Stmts;
					this.ExceptionClause = blockSqlNode.ExceptionClause;
					return;
				}
				case ECreateFunctionOptionType.language:
					this._procedureLanguage = value.Language;
					return;
				case ECreateFunctionOptionType.window:
				case ECreateFunctionOptionType.common:
					break;
				case ECreateFunctionOptionType.objfile:
					this._objfile = value.Objfile;
					this._linkSymbol = value.LinkSymbol;
					break;
				default:
					return;
				}
			}
		}

		// Token: 0x0400176B RID: 5995
		private TCreateFunctionOption _functionOption;

		// Token: 0x0400176C RID: 5996
		private TConstant _sharedLibraryName;

		// Token: 0x0400176D RID: 5997
		private TConstant _functionDefinition;

		// Token: 0x0400176E RID: 5998
		private TConstant _functionBody;

		// Token: 0x0400176F RID: 5999
		private List<TProcedureOption> _procedureOptions;

		// Token: 0x04001770 RID: 6000
		private bool _isDeterministic;

		// Token: 0x04001771 RID: 6001
		private TInvokerRightsClause _invokerRightsClause;

		// Token: 0x04001772 RID: 6002
		private TParallelEnableClause _parallelEnableClause;

		// Token: 0x04001773 RID: 6003
		private TResultCacheClause _resultCacheClause;

		// Token: 0x04001774 RID: 6004
		private TObjectName _implementionType;

		// Token: 0x04001775 RID: 6005
		private TObjectName _functionName;

		// Token: 0x04001776 RID: 6006
		private TObjectName _asName;

		// Token: 0x04001777 RID: 6007
		private TParameterDeclarationList _parameters;

		// Token: 0x04001778 RID: 6008
		private TCallSpec _callSpec;

		// Token: 0x04001779 RID: 6009
		private int _kind = 1;

		// Token: 0x0400177A RID: 6010
		private TBlockSqlNode _blcok;

		// Token: 0x0400177B RID: 6011
		private TStatementListSqlNode _stmts;

		// Token: 0x0400177C RID: 6012
		private TStatementListSqlNode _declareStmts;

		// Token: 0x0400177D RID: 6013
		private TStatementSqlNode _stmt;

		// Token: 0x0400177E RID: 6014
		private TExceptionClause _exceptionClause;

		// Token: 0x0400177F RID: 6015
		private TReturnSqlNode _returnSqlNode;

		// Token: 0x04001780 RID: 6016
		private TTypeName _returnDataType;

		// Token: 0x04001781 RID: 6017
		private TDummy _returnTable;

		// Token: 0x04001782 RID: 6018
		private TCompoundSqlNode _compoundSql;

		// Token: 0x04001783 RID: 6019
		private TReturnSqlNode _returnSql;

		// Token: 0x04001784 RID: 6020
		private TConstant _objfile;

		// Token: 0x04001785 RID: 6021
		private TConstant _linkSymbol;

		// Token: 0x04001786 RID: 6022
		private TConstant _procedureLanguage;

		// Token: 0x04001787 RID: 6023
		private TObjectName _labelName;

		// Token: 0x04001788 RID: 6024
		private TObjectName _endLabelName;
	}
}
